{% extends 'homepage.html' %}

{% block content %}

    <script>
    function show_code(system) {
        $('.sage').hide()
        $('.pari').hide()
        $('.magma').hide()
        $('.'+system).show()
    }
    </script>

        <h1>
            {{ info.label }}</h1>
            <div>
                <a onclick="show_code('sage'); return false" href='#'>sage</a>
                <a onclick="show_code('pari'); return false" href='#'>pari</a>
                <a onclick="show_code('magma'); return false" href='#'>magma</a>
            </div>
        <div class='sage nodisplay code'>sage: E = EllipticCurve({{info.ainvs}})<br>sage: E.isogeny_class()</div>
        <div class='pari nodisplay code'>xxx</div>
        <h2>
            Curves
        </h2>
        <table border=0 width='100%'>
            <tr>
            <td align=center>Cremona<br>label</td>
            <td>\([a_1,a_2,a_3,a_4,a_6]\)</td>
            <td>rank</td>
            <td>&nbsp;</td>
            <td>torsion<br>order</td>
            </tr>
        {% for curve in info.curves: %}
            <tr>
            <td align=center><a href="/EllipticCurve/Q/{{curve.conductor}}/{{curve.iso}}/{{curve.number}}">{{curve.label}}</a></td>
            <td>{{info.format_ainvs(curve.ainvs)}}</td>
            <td align=center>{{curve.rank}}</td>
            <td>&nbsp;</td>
            <td align=center>{{curve.torsion}}</td>
            </tr>
        {% endfor %}
        </table>

        <h2>
            Modular form
        </h2>
        <div class='sage nodisplay code'>sage: E.q_eigenform(10)</div>
        <p>
            {{ info.f | safe }}
            <a href='{{info.download_qexp_url}}' target='_blank'>download</a>
        </p>
        <h2>
            Isogeny graph.
        </h2>
        <div class='sage nodisplay code'>sage: E.isogeny_graph().plot(edge_labels=True)<br>(Note: the following graph has been relabeled<br>to respect the Cremona labeling)</div>
        <center>
        <img src="{{info.graph_img}}" />
        </center>
    

{% endblock %}
</html>
